<template>
  <div>
    <van-card
      :num="item.num"
      :price="item.originprice"
      :desc="item.proname"
      :thumb="item.img1"
      v-for="(item,index) in orderlist"
      :key="index"
      class="goods-card"
    />
    <submit-bar :list="orderlist"></submit-bar>
  </div>
    
</template>

<script>
import { getOrder } from "../../apis/order";
import Vue from "vue";
import { Card } from "vant";
import SubmitBar from './SubmitBar.vue';
Vue.use(Card);

export default {
  name: "OrderList",
    components: {
         SubmitBar 
    },
  data() {
    return {
      orderlist: [],
    };
  },

  mounted() {},

  methods: {},
  created() {
    getOrder({
      userid: localStorage.getItem("userid"),
      time: localStorage.getItem("ordertime"),
    }).then((data) => {
      this.orderlist=data.data.data

    });
  },
};
</script>

<style  scoped>
.goods-card {
  margin: .1rem;
  background-color: #fff;
}

</style>